Skip to content

Fix phpdbg local console mode when using libedit/readline#13199

Closed
petk wants to merge 1 commit into
php:masterfrom
petk:patch-phpdbg-local-console
Closed

Fix phpdbg local console mode when using libedit/readline#13199
petk wants to merge 1 commit into
php:masterfrom
petk:patch-phpdbg-local-console

Conversation

@petk

@petk petk commented Jan 19, 2024

Copy link
Copy Markdown
Member

When using libedit/readline integration in phpdbg, EOF makes editline write prompt again in local console mode. For example, this can be noticed when reading phpt test files from STDIN and running phpdbg.

How to reproduce the issue:

./configure --with-readline --enable-phpdbg-readline
make
./sapi/cli/php run-tests.php sapi/phpdbg
# here tests fail with prompt being repeated in the output

After this patch, phpdbg tests pass.

When using libedit/readline integration in phpdbg, EOF makes editline
write prompt again in local console mode. For example, this can be
noticed when reading phpt test files from STDIN and running phpdbg.
@iluuu1994 iluuu1994 requested a review from bwoebi January 19, 2024 23:14
@petk petk mentioned this pull request Jan 19, 2024
6 tasks
petk added a commit to petk/php-build-system that referenced this pull request Mar 19, 2024
This fixes warnings that fill up the build log due to different
compilation flags used and clang.

See: php/php-src#13199

@remicollet remicollet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm phpdbg test suite passes with this fix

@remicollet

Copy link
Copy Markdown
Member

Perhaps worth applying in maintained branches (at least 8.3 is affected)

@remicollet

Copy link
Copy Markdown
Member

Tested on 8.2, 8.3 and master
Patch work on all maintained branches

petk added a commit that referenced this pull request Aug 2, 2024
* PHP-8.2:
  Fix GH-13199: Redundant prompt in phpdbg with libedit/readline
@petk petk closed this in dc670cb Aug 2, 2024
petk added a commit that referenced this pull request Aug 2, 2024
* PHP-8.3:
  Fix GH-13199: Redundant prompt in phpdbg with libedit/readline
@petk petk deleted the patch-phpdbg-local-console branch August 2, 2024 06:39
@petk

petk commented Aug 2, 2024

Copy link
Copy Markdown
Member Author

Ok, thanks for the review. Added to PHP-8.2 and up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants